using System.Collections;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using UnityEngine;

public partial class MatchingPage : Page
{
    float _cd;

    [ShowInInspector]
    public float CD
    {
        get => _cd;
        set => _cd = value;
    }

    public override void OnNavigatedTo(PageNavigateInfo navigateInfo)
    {
        if(navigateInfo.terminalOperation == NavigateOperation.Forward)
        {
            this.CD = 0;
        }
    }

    protected override void Refresh()
    {
        this.RefreshCd();
    }

    void RefreshCd()
    {
        this.Text_cd.text = ((int)this.CD).ToString();
        //this.Text_cd.text = this.CD.ToString();
    }

    void Update()
    {
        this.CD += Time.deltaTime;
        this.SetDirty();
    }


}
